home *** CD-ROM | disk | FTP | other *** search
/ Delphi 2.0 - Programmer's Utilities Power Pack / Delphi 2.0 Programmer's Utilities Power Pack.iso / a_to_d / bildemo / demo.tx_ / demo.tx
Encoding:
Text File  |  1996-09-15  |  17.7 KB  |  540 lines

  1.             Blaise Install Library for Delphi
  2.  
  3. Blaise Install (BIL) is a library containing functions for creating
  4. windows install programs in Borland Delphi. BIL includes instructions 
  5. & functions for:
  6.  
  7.     - Creating directories
  8.     - Decompressing files
  9.     - Adding Drivers/Aliases to Borland Database Engine (BDE)
  10.     - Modifying INI files including
  11.         ODBC.INI, ODBCINST.INI, WIN.INI
  12.    - Add Program Items/Groups to the Windows Program manager
  13.  
  14. Blaise Install Demo can be retrieved from Compuserve Borland Delphi
  15. Forum/Library Section (3rd Party Products).  The demo version includes:  
  16.  
  17.     - General instructions on how to use library
  18.     - Limited library of install functions
  19.     - Demo of install functions
  20.  
  21. A more comprehensive version of Blaise Install is available which
  22. includes the above and the following:
  23.  
  24.     - Complete library of install functions
  25.     - Source code for library
  26.     - Examples of install programs created in Delphi
  27.  
  28. To purchase Blaise Install send $25.00 to:
  29.  
  30.         Blaise Install Library
  31.         P.O. Box 7701
  32.         Wilton, CT 06897-7701
  33.  
  34.    NOTE: CT residents include 6% sales tax
  35.          US customers add $2.00 for shipping & handling
  36.          International customers add $5.00 for shipping & handling
  37.  
  38. Support questions should be directed to Compuserve account 73112,2544.
  39.  
  40.  
  41.    Delphi is a Trade Mark of Borland International Inc
  42.    Visual Basic is a Trade Mark of Microsoft Corporation                      
  43.    Visual C++ is a Trade Mark of Microsoft Corporation                      
  44.    CompuServe is a Registered Trade Mark of CompuServe Incorporated
  45.  
  46.  
  47.    Model:  bAdd2ProgMan( 
  48.               DdeClientConv1: TDdeClientConv;
  49.               sGroup: string; 
  50.               sItem: string;
  51.               sFile:string ):
  52.                  Boolean
  53.  
  54.    Desc:   Creates a Program Group & Item.
  55.  
  56.    Params:    DdeClientConv1: TDdeClientConv;
  57.                                    create by clicking on the System tab 
  58.                                    on the visual controls,  then clicking 
  59.                                    on the DdeClientConv 
  60.               sGroup: string;      The Program Group Description
  61.               sItem: string;       The Program Item Description
  62.               sFile:string         The Program executable
  63.  
  64.    Returns:   True if added successfully
  65.  
  66.    Warning:   This function will do nothing if one of the bInstallFile
  67.               functions was cancelled by the user.
  68. -----------------------------------------------------------------------
  69.    Model:  bBDEAddAlias(
  70.               sItem: string; 
  71.               TListParams: TStringList):
  72.                  boolean
  73.  
  74.    Desc:      Add a BDE Alias to IDAPI.CFG
  75.  
  76.    Params:    sItem: string                The Alias you want to add
  77.               TListParams: TStringList     A string list of all parameters
  78.                                            that are needed for the Alias
  79.  
  80.    Returns:   True if alias was added properly
  81.  
  82.    Example:
  83.       TListParams:= TStringList.create;
  84.       TListParams.Add( 'DB INFO');
  85.       TListParams.Add( 'TYPE=ODBC_XYZ' );
  86.       TListParams.Add( 'PATH=' );
  87.       TListParams.Add( 'DB OPEN' );
  88.       TListParams.Add( 'USER NAME=' );
  89.       TListParams.Add( 'ODBC DSN=MYDSN' );
  90.       TListParams.Add( 'OPEN MODE=READ/WRITE' );
  91.       TListParams.Add( 'SCHEMA CACHE SIZE=8' );
  92.       TListParams.Add( 'SQLQRYMODE=' );
  93.       TListParams.Add( 'LANGDRIVER=' );
  94.       TListParams.Add( 'SQLPASSTHRU MODE=' );
  95.       bBDEAddAlias('CTF',TListParams);
  96.       TListParams.Clear;
  97.  
  98.    See Also:
  99.  
  100.    Warning:   This function will do nothing if one of the bInstallFile
  101.               functions was cancelled by the user.
  102.  
  103.    Model:  bBDEAddDriver(
  104.               sItem: string; 
  105.               TListParams: TStringList):
  106.                  boolean;
  107.  
  108.    Desc:      Add a BDE Driver to IDAPI.CFG
  109.  
  110.    Params:
  111.               sItem: string                The Driver you want to add
  112.               TListParams: TStringList     A string list of all parameters
  113.                                            that are needed for the driver
  114.  
  115.    Returns:   True if Driver was added properly
  116.  
  117.    Example:
  118.       TListParams:= TStringList.create;
  119.       TListParams.Add( 'INIT' );
  120.       TListParams.Add( 'VERSION=1.0' );
  121.       TListParams.Add( 'TYPE=SERVER' );
  122.       TListParams.Add( 'DLL=IDODBC01.DLL' );
  123.       TListParams.Add( 'ODBC DRIVER=MY ODBC DRIVER' );
  124.       TListParams.Add( 'DRIVER FLAGS=' );
  125.       TListParams.Add( 'DB OPEN' );
  126.       TListParams.Add( 'USER NAME=' );
  127.       TListParams.Add( 'ODBC DSN=MYDSN' );
  128.       TListParams.Add( 'OPEN MODE=READ/WRITE' );
  129.       TListParams.Add( 'SCHEMA CACHE SIZE=8' );
  130.       TListParams.Add( 'SQLQRYMODE=' );
  131.       TListParams.Add( 'LANGDRIVER=' );
  132.       TListParams.Add( 'SQLPASSTHRU MODE=' );
  133.       bBDEAddDriver('ODBC_XYZ',TListParams);
  134.       TListParams.Clear;
  135.  
  136.    Warning:   This function will do nothing if one of the bInstallFile
  137.               functions was cancelled by the user.
  138. -----------------------------------------------------------------------
  139.    Model:     bCopyFile( 
  140.                  sFromFile: string; 
  141.                  sToFile: string ): 
  142.                  boolean;
  143.  
  144.    Desc:      Copy a file from sFromFile to sToFile
  145.  
  146.    Params:
  147.               sFromFile: string          The file to copy from
  148.               sToFile: string            The file to copy to
  149.  
  150.    Returns:   True is file was successfully copied otherwise false
  151.  
  152.    Warning:   This function will do nothing if one of the bInstallFile
  153.               functions was cancelled by the user.
  154.  
  155.    Model:     bCreateDirectory( 
  156.                  sDirectory ): 
  157.                     boolean     
  158.  
  159.    Desc:      Create a file directory
  160.  
  161.    Params:    sDirectory    The directory to create
  162.  
  163.    Returns:   True if the directory was created successfully
  164.  
  165.    Example:
  166.          bCreateDirectory( 'C:\MyDir' );
  167.  
  168.    See Also:
  169. -----------------------------------------------------------------------
  170.    Model:     bDeleteFile( 
  171.                  sFile: string ): 
  172.                  boolean;
  173.  
  174.    Desc:      Delete the file sFile
  175.  
  176.    Params:
  177.               sFile: string        The file to delete
  178.  
  179.    Returns:   True if the file was deleted
  180.  
  181.    Example:
  182.               bDeleteFile( 'C;\Junk\Junk.TXT' )
  183.  
  184.    See Also:
  185.  
  186.    Warning:   This function will do nothing if one of the bInstallFile
  187.               functions was cancelled by the user.
  188.  
  189.    Model:     bInstallFile( 
  190.                    sFromFile: string; 
  191.                    sToFile: string; 
  192.                    iCopyType: Integer;
  193.                    sDir: string )
  194.                    :Boolean;
  195.  
  196.    Desc:      This function decompresses sFromFile into a file sToFile.
  197.               It gets sFromFile from the drive/directory specified in
  198.               SetInstallFromDir().  
  199.  
  200.               Acceptable values for iCopyType are:
  201.                   fiSameDateTimeIgnore       If the files are the same
  202.                                              date/time don't decompress
  203.                   fiExistsIgnore             If the file exists don't 
  204.                                              overwrite it
  205.                   fiExistsOverwrite          If the file exists 
  206.                                              overwrite it
  207.  
  208.  
  209.               The file is put into a directory based on the value put 
  210.               in sDir:
  211.  
  212.                   sDir           Directory
  213.                   -----          ----------
  214.                   'P'            The program directory  ( based on 
  215.                                  value supplied in SetInstallToDir() )
  216.                   'I'            The IDAPI Directory
  217.                   'L'            The IDAPI Language Drivers Directory
  218.                   'W'            The Windows Directory
  219.                   'S'            The Windows System Directory
  220.                   Path String    A string that represents a path to put
  221.                                  the file into
  222.  
  223.  
  224.    Params:
  225.               sFromFile: string  The compressed file name
  226.               sToFile: string    The decompressed file name
  227.               iCopyType: Integer Integer code that tells when to copy
  228.               sDir: string       A string that tells you where to put 
  229.                                  the new file.
  230.  
  231.    Returns:   True if files match when completed
  232.  
  233.    Note:      This function decompresses files. To create a compressed 
  234.               file you can use compress.exe.  This program can be 
  235.               obtained from either:
  236.                        Microsoft Visual Basic
  237.                        Microsoft Visual C++
  238.                        Download from CompuServe
  239.                            MSSNA/3RD PTY-UNSUPPORTED Forum/Library
  240.  
  241.    Example:
  242.  
  243.       - Decompress A:\ODBC.DL_ to the windows system directory ODBC.DLL
  244.         (ex: C:\WINDOWS\SYSTEM\ODBC.DLL)  
  245.  
  246.       SetInstallFromDir( 'A:\' );
  247.       bInstallFile( 'ODBC.DL_', 'ODBC.DLL', fiSameDateTimeIgnore, 'S');
  248.  
  249.       - Decompress A:\MyProg.EX_ to the program directory 
  250.         (C:\MyDir\MyProg.EXE)
  251.  
  252.       SetInstallToDir( 'C:\MyDir' );
  253.       SetInstallFromDir( 'A:\' );
  254.       bInstallFile( 'MyProg.EX_', 'MyProg.EXE', fiSameDateTimeIgnore, 'P');
  255.  
  256.    See Also:
  257.  
  258.        SetInstallToDir
  259.        SetInstallFromDir
  260.  
  261.    Warning:   This function will do nothing if one of the bInstallFile
  262.               functions was cancelled by the user.
  263. -----------------------------------------------------------------------
  264.    Model:     bWriteProfile( 
  265.                  sFile: string;  
  266.                  sGroup: string; 
  267.                  sItem: string; 
  268.                  sValue: string):
  269.                     Boolean
  270.  
  271.    Desc:      Put a value (sValue) into an INI file (sFile) in a group
  272.               (sGroup) with an Item Key
  273.  
  274.    Params: 
  275.                  sFile: string      The INI file to edit
  276.                  sGroup: string     The group to edit
  277.                  sItem: string      The Item to edit
  278.                  sValue: string     The value to give to the item
  279.  
  280.    Returns:   True if added successfully, otherwise false.
  281.  
  282.    Example:
  283.               bWriteProfile( 'c:\MyProg\MyProg.INI',
  284.                             'DATABASE',
  285.                             'MYDATABASE'
  286.                             'C:\MyProg\MyProg.DAT');
  287.  
  288.               This line puts the following into c:\MyProg\MyProg.INI
  289.               [DATABASE]
  290.               MYDATABASE=C:\MyProg\MyProg.DAT
  291.  
  292.    Warning:   This function will do nothing if one of the bInstallFile
  293.               functions was cancelled by the user.
  294.  
  295.    Model:         sBackUpByNumber( cFile: String):
  296.                                String
  297.  
  298.    Desc:          Backup a file. The backup files name is the same as
  299.                   the file that is being backed up.  The extension is
  300.                   a sequential number.
  301.  
  302.    Params:        cFile          A file to backup
  303.  
  304.    Returns:       The backedup file name
  305.  
  306.    Example:       
  307.          cIDAPI := sReadProfile( sGetWinDir + '\WIN.INI',
  308.                                  'IDAPI', 'CONFIGFILE01', '');
  309.          sBackUpByNumber( cIDAPI );
  310.  
  311.          will return 'C:\WINDOWS\WIN.1' the first time it is run
  312.          will return 'C:\WINDOWS\WIN.2' the second time it is run
  313.  
  314.    See Also:
  315.  
  316. -----------------------------------------------------------------------
  317.    Model:     SetInstallFromDir( 
  318.                  sInstallFrom: String );
  319.  
  320.    Desc:      Sets the install from directory to sInstallFrom.
  321.               This is the Drive/Directory where the install programs
  322.               come from.
  323.  
  324.               This function sets a static variable that will be used by
  325.               the bInstallFile function. This static varable will tell
  326.               bInstallFile() where to get files it is copying.
  327.  
  328.    Params:    sInstallFrom  The new directory you are copying program
  329.                             files from.
  330.  
  331.    Example:
  332.  
  333.       - Set directory to a directory supplied in a Edit Box
  334.       SetInstallFromDir( EditInstallFrom.Text );
  335.  
  336.       - Set Directory to directory in a string
  337.       SetInstallFromDir( 'A:\' );
  338.  
  339.  
  340.    See Also:
  341.  
  342.        bInstallFile
  343.  
  344.    Model:     SetInstallToDir( 
  345.                  sInstallTo: String );
  346.  
  347.    Desc:      Sets the install to directory to sInstallTo.
  348.               This is the Drive/Directory where programs are copied to.
  349.  
  350.               This function sets a static variable that will be used by
  351.               the bInstallFile function. This static varable will tell
  352.               bInstallFile() where to put program files it is copying.
  353.  
  354.    Params:    sInstallTo    The new directory you are copying program
  355.                             files to.
  356.  
  357.    Example:
  358.  
  359.       - Set directory to a directory supplied in a Edit Box
  360.       SetInstallToDir( EditInstallTo.Text );
  361.  
  362.       - Set Directory to directory in a string
  363.       SetInstallToDir( 'C:\MYDIR' );
  364.  
  365.    See Also:
  366.  
  367.        bInstallFile
  368. -------------------------------------------------------------------------
  369.    Model:         sGetPath( cFile: String):
  370.                                String
  371.  
  372.    Desc:          Returns a path from a fully qualified file name
  373.  
  374.    Params:        cFile          A file name
  375.  
  376.    Returns:       The path of the file name
  377.  
  378.    Example:       Get directory exe is running
  379.                
  380.                   sGetPath(Application.ExeName);
  381.  
  382.    See Also:
  383.  
  384. -----------------------------------------------------------------------
  385.    Model:         sGetProgDir
  386.  
  387.    Desc:          Returns a string that represents the Program
  388.                   Drive & Directory.
  389.  
  390.                   The Program Directory is set with the SetInstallToDir
  391.                   function.
  392.  
  393.    Params: 
  394.  
  395.    Returns:       sGetProgDir
  396.  
  397.    Example:
  398.  
  399.    See Also:
  400.  
  401.        SetInstallToDir
  402.  
  403.    Model:         sGetSysDir
  404.  
  405.    Desc:          Returns a string that represents the Windows
  406.                   System Drive & Directory.
  407.  
  408.    Params: 
  409.  
  410.    Returns:       sGetSysDir
  411.  
  412.    Example:
  413.  
  414.    See Also:
  415. -----------------------------------------------------------------------
  416.    Model:         sGetWinDir
  417.  
  418.    Desc:          Returns a string that represents the Windows
  419.                   Drive & Directory.
  420.  
  421.    Params: 
  422.  
  423.    Returns:       sGetWinDir
  424.  
  425.    Example:
  426.  
  427.    See Also:
  428. -----------------------------------------------------------------------
  429.    Model:     sReadProfile( 
  430.                  sFile: string;  
  431.                  sGroup: string; 
  432.                  sItem: string; 
  433.                  sDefault: string):
  434.                     String
  435.  
  436.    Desc:      Get a value string in an INI file (sFile) in a group
  437.               (sGroup) with an Item Key. If no value is found return
  438.                the default value.
  439.  
  440.    Params: 
  441.                  sFile: string      The INI file to read
  442.                  sGroup: string     The group to read
  443.                  sItem: string      The Item to read
  444.                  sDefault: string   The default value to give to the item
  445.  
  446.    Returns:   The string in the INI file
  447.  
  448.    Example:
  449.               sReadProfile( 'c:\MyProg\MyProg.INI',
  450.                             'DATABASE',
  451.                             'MYDATABASE'
  452.                             '');
  453.  
  454.               This call gets c:\MyProg\MyProg.DAT from the following 
  455.               example in c:\MyProg\MyProg.INI
  456.  
  457.               [DATABASE]
  458.               MYDATABASE=C:\MyProg\MyProg.DAT
  459.  
  460.    Warning:   This function will do nothing if one of the bInstallFile
  461.               functions was cancelled by the user.
  462.  
  463.    Model:     sTempFile: 
  464.                  string;
  465.  
  466.    Desc:      Create a temporary file name.  This file name is located
  467.               in the directory described in the TEMP enviromental 
  468.               variable.
  469.  
  470.    Params:
  471.  
  472.    Returns:   A temporary File Name
  473.  
  474.    Example:
  475.  
  476.    See Also:
  477.  
  478.    Warning:   This function will do nothing if one of the bInstallFile
  479.               functions was cancelled by the user.
  480.  
  481.                LIMITED WARRANTY
  482.  
  483. THIS PROGRAM, INSTRUCTION MANUAL, AND REFERENCE MATERIALS ARE SOLD 
  484. "AS IS," WITHOUT WARRANTY AS TO THEIR PERFORMANCE, MERCHANTABILITY, 
  485. OR FITNESS FOR ANY PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE 
  486. RESULTS AND PERFORMANCE OF THIS PROGRAM IS ASSUMED BY Y0U.
  487.  
  488. HOWEVER, TO THE ORIGINAL PURCHASER ONLY, THE PUBLISHER WARRANTS THE 
  489. MAGNETIC DISKETTE ON WHICH THE PROGRAM IS RECORDED TO BE FREE FROM 
  490. DEFECTS IN MATERIALS AND FAULTY WORKMANSHIP UNDER NORMAL USE FOR A 
  491. PERIOD OF NINETY DAYS FROM THE DATE OF PURCHASE. IF DURING THIS 
  492. NINETY-DAY PERIOD THE DISKETTE SHOULD BECOME DEFECTIVE, IT MAY BE 
  493. RETURNED TO THE PUBLISHER FOR A REPLACEMENT WITHOUT CHARGE, PROVIDED 
  494. YOU HAVE PREVIOUSLY SENT IN OUR LIMITED WARRANTY REGISTRATION CARD TO 
  495. THE PUBLISHER OR SEND PROOF OF PURCHASE OF THE PROGRAM.
  496.  
  497. YOUR SOLE AND EXCLUSIVE REMEDY IN THE EVENT OF A DEFECT IS EXPRESSLY 
  498. LIMITED TO REPLACEMENT OF THE DISKETTE AS PROVIDED ABOVE. IF FAILURE 
  499. OF A DISKETTE HAS RESULTED FROM ACCIDENT OR ABUSE, THE PUBLISHER SHALL 
  500. HAVE NO RESPONSIBILITY TO REPLACE THE DISKETTE UNDER THE TERMS OF THIS 
  501. LIMITED WARRANTY.
  502.  
  503. ANY IMPLIED WARRANTIES RELATING TO THE DISKETTE, INCLUDING ANY IMPLIED 
  504. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE 
  505. LIMITED TO A PERIOD OF NINETY DAYS FROM DATE OF PURCHASE. PUBLISHER SHALL 
  506. NOT BE LIABLE FOR INDIRECT, SPECIAL, OR CONSEQUENTIAL DAMAGES RESULTING 
  507. FROM THE USE OF THIS PRODUCT. SOME STATES DO NOT ALLOW THE EXCLUSION OR 
  508. LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE 
  509. LIMITATIONS MIGHT NOT APPLY TO YOU. THIS WARRANTY GIVES YOU SPECIFIC 
  510. LEGAL RIGHTS, AND YOU MAY ALSO HAVE OTHER RIGHTS WHICH VARY FROM STATE 
  511. TO STATE.
  512.  
  513. -------------------------------------------------------------------------
  514.  
  515.                       WARRANTY REGISTRATION CARD
  516.  
  517. NAME:
  518.  
  519. COMPANY:
  520.  
  521. ADDRESS:
  522.  
  523. CITY:
  524.  
  525. STATE:
  526.  
  527. ZIP CODE:
  528.  
  529. TYPE OF BUSINESS:
  530.  
  531. PROGRAM PURCHASE:
  532.  
  533. SERIAL NUMBER:
  534.  
  535. DATE PURCHASED:
  536.  
  537. COMPUTER BRAND:
  538.  
  539.  
  540.